int findTheDistanceValue(int* arr1, int arr1Size, int* arr2, int arr2Size, int d) {
    int n = 0;
    for (int i = 0; i < arr1Size; i++)
    {
        int flag = 0;
        for (int j = 0; j < arr2Size; j++)
        {
            int max = arr1[i] - arr2[j];
            if (max < 0)
            {
                max = 0 - max;
            }
            if (max <= d)
            {
                flag = 1;
                break;
            }
        }
        if (flag == 0)
            n++;
    }
    return n;
}